package com.util;

import com.app.App;
import com.view.LoginView;

import javax.swing.*;


public class ReturnLevel {
    public static void returnLevel() {
        int n = 0;
        while (n != 1 && n != 2 ) {
            System.out.println("1.返回首页");
            System.out.println("2.退出系统");
            n = Read.getIn().nextInt();
            switch (n) {
                case 1:
                    App.main();
                    break;
                case 2:
                    System.exit(0);
                    break;
                default:
                    System.out.println("请选择功能！");
                    break;
            }
        }

    }
}
